package cn.ang.app.controller;

import cn.ang.app.pojo.AppCategory;
import cn.ang.app.service.AppCategoryService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/appCategory")
public class AppCategoryController {

    @Resource(name = "appCategoryServiceImpl")
    private AppCategoryService appCategoryService;

    @RequestMapping("/showAppCategory")
    public @ResponseBody
    Object showAppCategory(Long parentId ) {
        List<AppCategory> appCatagorys = appCategoryService.getAppCatagorys(parentId);
        return appCatagorys;
    }
}
